<template>
  <div>
    <!--三级联动全局组件-->
    <TypeNav/>
    <ListContainer/>
    <Like/>
    <Floor v-for="(floor,index) in getfloorList" :key="floor.id" :list="floor"/>

    <Brand/>
  </div>
</template>

<script>
import ListContainer from '@views/Home/ListContainer'
import Recommend from '@views/Home/Recommend'
import Rank from '@views/Home/Rank'
import Like from '@views/Home/Like'
import Floor from '@views/Home/Floor'
import Brand from './Brand'
import {mapState} from 'vuex'
export default {
  components: { Brand, ListContainer, Recommend, Rank, Like, Floor },
  mounted () {
    // 派发action,获取floor组件数据
    this.$store.dispatch('getfloorList')
    // 获取用户信息在首页展示
    // this.$store.dispatch('getUserInfo')
  },
  computed:{
    ...mapState({
      getfloorList:(state => {
        return state.home.getfloorList
      })
    })
  }
}
</script>

<style scoped>

</style>
